import 'package:flutter/material.dart';
import 'package:flutter_architecture/config/app_theme.dart';
import 'package:flutter_architecture/utils/screen_util.dart';

/// 整个App的AppBar设置，特殊属性传递即可
/// 同意透明背景色，黑色文字，居中
/// @author: dingwen
/// @date: 2021/1/9

AppBar architectureAppBar({title, isShowBackButton,List<Widget> actions}) {
  return AppBar(
    title: Text(
      '$title',
      style: AppTheme.textTheme.headline6,
    ),
    centerTitle: true,
    leading: isShowBackButton ? BackButton() : null,
    backgroundColor: Colors.transparent,
    actions: actions,
  );
}

